package com.fr.report.core.barcode.line.code128;

import java.util.ArrayList;
import java.util.List;

final class CharBuffer
{
  private final int size;
  private List chars;

  CharBuffer(int paramInt)
  {
    this.size = paramInt;
    this.chars = new ArrayList();
  }

  int size()
  {
    return this.chars.size();
  }

  void addChar(char paramChar)
  {
    this.chars.add(new Character(paramChar));
  }

  boolean isFull()
  {
    return (this.chars.size() == this.size);
  }

  public String toString()
  {
    char[] arrayOfChar = new char[this.size];
    for (int i = 0; i < this.size; ++i)
    {
      Character localCharacter = (Character)this.chars.get(i);
      arrayOfChar[i] = localCharacter.charValue();
    }
    return new String(arrayOfChar);
  }

  void clear()
  {
    this.chars.clear();
  }
}